using Godot;
using System;

public partial class HeroAnimationPlayer : AnimationPlayer
{
	// Called when the node enters the scene tree for the first time.
	public override void _Ready()
	{
		AnimationFinished += AnimeFinish;
	}

	private void AnimeFinish(StringName animName)
	{

	}

	public async void Punch()
	{

		Play("punch");
		GD.Print("我打了");
		await ToSignal(this, SignalName.AnimationFinished);
		GD.Print("我打完了");
	}

	public void Walk()
	{
		if (!IsPlaying())
		{
			GD.Print("我走路了");
			//Play("punch");
			Play("walk");
		}

	}

	// Called every frame. 'delta' is the elapsed time since the previous frame.
	public override void _Process(double delta)
	{
	}
}
